<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>th:if 用法:如果满足条件显示，否则不显示；eq 相当于 == ；ne 相当于 !=</h1>
<span th:if="${sex eq 0}">男</span>
<span th:if="${sex eq 1}">女</span><br/><br/>
-----------------------------------------------
<span th:if="${sex == 0}">男</span>
<span th:if="${sex != 1}">女</span><br/><br/>
-----------------------------------------------
<h1>th:unless 用法：与 th:if 用法相反，即对条件判断条件取反</h1>
<span th:unless="${sex eq 0}">男</span>
<span th:unless="${sex eq 1}">女</span><br/><br/>
-----------------------------------------------
<span th:unless="${sex ne 0}">男</span><br/><br/>
<span th:unless="${sex ne 1}">女</span>
</body>
</html>